🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / MeshNotificationManager.kt
Displaying Raw • Download
core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/MeshNotificationManager.kt 65a1f5ce4d0e4b8eafcd0bbfccafd41dc6ee888a (65a1f5ce) Text, 3.45 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository
Tff7b72import T7ee787org.meshtastic.core.model.ConnectionState
Tff7b72import T7ee787org.meshtastic.core.model.Node
Tff7b72import T7ee787org.meshtastic.proto.ClientNotification
Tff7b72import T7ee787org.meshtastic.proto.Telemetry
Tff7b72const Tff7b72val Te6edf3SERVICE_NOTIFY_ID Tff7b72= T79c0ff1T79c0ff0T79c0ff1
T8b949e/**
* Mesh-domain notification builder. Provides high-level operations for the message arrival, waypoint, reaction, new
* node, low-battery, and client notification flows specific to this app. Implementations are expected to render the
* platform notification themselves; the generic dispatch primitive is [NotificationManager] (which posts/cancels opaque
* [Notification] records and is *not* domain-aware).
*/
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffTooManyFunctionsTa5d6ff"Tb4b4b4)
Tff7b72interface T56d364MeshNotificationManager Tb4b4b4{
Tff7b72fun Td2a8ffclearNotificationsTb4b4b4(Tb4b4b4)
Tff7b72fun Td2a8ffinitChannelsTb4b4b4(Tb4b4b4)
Tff7b72fun Td2a8ffupdateServiceStateNotificationTb4b4b4(Te6edf3stateTb4b4b4: Te6edf3ConnectionStateTb4b4b4, Te6edf3telemetryTb4b4b4: Te6edf3Telemetry?Tb4b4b4)
Tff7b72suspend Tff7b72fun Td2a8ffupdateMessageNotificationTb4b4b4(
Te6edf3contactKeyTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3isBroadcastTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3channelNameTb4b4b4: Tffa657String?Tb4b4b4,
Te6edf3isSilentTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4,
Tb4b4b4)
Tff7b72suspend Tff7b72fun Td2a8ffupdateWaypointNotificationTb4b4b4(
Te6edf3contactKeyTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3messageTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3waypointIdTb4b4b4: Tffa657IntTb4b4b4,
Te6edf3isSilentTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4,
Tb4b4b4)
Tff7b72suspend Tff7b72fun Td2a8ffupdateReactionNotificationTb4b4b4(
Te6edf3contactKeyTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3emojiTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3isBroadcastTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3channelNameTb4b4b4: Tffa657String?Tb4b4b4,
Te6edf3isSilentTb4b4b4: Tffa657Boolean Tff7b72= Tff7b72falseTb4b4b4,
Tb4b4b4)
Tff7b72fun Td2a8ffshowAlertNotificationTb4b4b4(Te6edf3contactKeyTb4b4b4: Tffa657StringTb4b4b4, Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4, Te6edf3alertTb4b4b4: Tffa657StringTb4b4b4)
Tff7b72fun Td2a8ffshowNewNodeSeenNotificationTb4b4b4(Te6edf3nodeTb4b4b4: Te6edf3NodeTb4b4b4)
Tff7b72fun Td2a8ffshowOrUpdateLowBatteryNotificationTb4b4b4(Te6edf3nodeTb4b4b4: Te6edf3NodeTb4b4b4, Te6edf3isRemoteTb4b4b4: Tffa657BooleanTb4b4b4)
Tff7b72fun Td2a8ffshowClientNotificationTb4b4b4(Te6edf3clientNotificationTb4b4b4: Te6edf3ClientNotificationTb4b4b4)
T8b949e/**
* Suspending because Android rebuilds the group summary here, and the summary's labels come from string resources —
* resolving them must not block the caller's thread (see [org.meshtastic.core.resources.getStringSuspend]).
*/
Tff7b72suspend Tff7b72fun Td2a8ffcancelMessageNotificationTb4b4b4(Te6edf3contactKeyTb4b4b4: Tffa657StringTb4b4b4)
T8b949e/**
* Called after an inline notification reply has been sent and persisted. Platforms that can should re-post the
* conversation notification silently with the sent reply appended — the MessagingStyle confirmation flow — so the
* RemoteInput spinner resolves with visible feedback instead of the notification vanishing. The default falls back
* to dismissing the conversation, which also resolves the spinner.
*/
Tff7b72suspend Tff7b72fun Td2a8ffrefreshConversationAfterReplyTb4b4b4(Te6edf3contactKeyTb4b4b4: Tffa657StringTb4b4b4) Tff7b72= Te6edf3cancelMessageNotificationTb4b4b4(Te6edf3contactKeyTb4b4b4)
Tff7b72fun Td2a8ffcancelLowBatteryNotificationTb4b4b4(Te6edf3nodeTb4b4b4: Te6edf3NodeTb4b4b4)
Tff7b72fun Td2a8ffclearClientNotificationTb4b4b4(Te6edf3notificationTb4b4b4: Te6edf3ClientNotificationTb4b4b4)
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s